function createArray<S,N>(value:S,len:N):S[]{
  let arr=[]
  for (let i = 0; i < Number(len); i++) {
    arr.push(value)
  }
  return arr
}

let arr2=createArray<String,Number>('5',4)

console.log(arr2)

const swap=()=>{
  
}